<?php 
include_once dirname(__FILE__)."/common/basic.php";
if($_GET[feedid]){
	$feed = $func->getFeedDetail($_GET[feedid]);
	if($feed){
		$func->share_record($feed[id],$_SESSION[uid],$_SERVER[REMOTE_ADDR],$_GET[webid]);

		$title = $func->share_content($feed);
		
		if($_GET[webid]=='sina'){
			$func->redirect("http://service.weibo.com/share/share.php?title=".urlencode($title)."&url=".urlencode("$config[weburl]/u.php?feed=$feed[id]"));
		}elseif($_GET[webid]=='qz'){
			$func->redirect("http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?title=".urlencode($title)."&url=".urlencode("$config[weburl]/u.php?feed=$feed[id]"));
		}elseif($_GET[webid]=='qt'){
			$func->redirect("http://share.v.t.qq.com/index.php?c=share&a=index&title=".urlencode($title)."&url=".urlencode("$config[weburl]/u.php?feed=$feed[id]"));
		}
	}else{
		$func->error("e12070402","该资源不存在或已被删除");
	}
}else{
	$func->error("e12070401","该资源不存在或已被删除");
}
?>